package cn.edu.ctbu.scoremg.dao;

import cn.edu.ctbu.scoremg.entity.Student;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Modifying;
import org.springframework.data.jpa.repository.Query;

import java.util.List;

public interface StudentRepository extends JpaRepository<Student, Integer> {
    List<Student> findBySno(String sno);
    @Modifying
    @Query("delete from tb_student s where s.id in :ids")
    void deleteByIds(List<Integer> ids);
    }
